package com.cainiao.backend;

import com.cainiao.config.DruidDBConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;

import javax.sql.DataSource;

@SpringBootApplication
@EnableConfigurationProperties({DruidDBConfig.class})
@ComponentScan("com.cainiao.*")
@ServletComponentScan(value = "com.cainiao.config")
@MapperScan("com.cainiao.mapper")
public class BackendApplication {
    @Autowired
    DataSource dataSource;
    public static void main(String[] args) {
        SpringApplication.run(BackendApplication.class, args);
    }
}
